package com.gues.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gues.eneity.UserRole;
import com.gues.mapper.UserRoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@SuppressWarnings("all")
public class UserRoleService {

    @Autowired
    UserRoleMapper userRoleMapper;

    public List<UserRole> selectByUserId(Integer userId) {
        QueryWrapper<UserRole> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_id", userId);
        return userRoleMapper.selectList(queryWrapper);
    }
}
